recognition of ``double-clicks'' by treating these as specially
modified <#2190#><TT>:button-press</TT><#2190#> or <#2191#><TT>:button-release</TT><#2191#> events. A
``click'' is a <#2192#><TT>:button-press</TT><#2192#> event followed immediately by a <#2193#><TT>:button-release</TT><#2193#> event for the same button, with no intervening change
in pointer position<A NAME="tex2html253" HREF="#footfnm1" TARGET="footer"><SUP>43.1</SUP></A> or modifier
key state. A ``double-click''
is a sequence of two clicks of the same button in rapid succession. The
definition of a double-click ``event'' is thus time-sensitive; for a
double-click to be recognized, the time interval between events in the
sequence cannot exceed a certain maximum. The <#2195#><TT>display-multipress-delay-limit</TT><#2195#> accessor defines the maximum
inter-event time
interval, in milliseconds,
for a given <#2196#><TT>contact-display</TT><#2196#>.<A ID="2197"><tex2html_anchor_invisible_mark></A>
<P>
During event translation for a <#2198#><TT>:button-press</TT><#2198#> event, CLUE will
invoke double-click processing when it attempts to match a <#2199#><TT>:button-press</TT><#2199#> event specification
containing the <#2200#><TT>:double-click</TT><#2200#> keyword (see
Section~<A HREF=<tex2html_cr_mark>#ch:event-specifications#2201><tex2html_cr_mark></A>). CLUE then
looks ahead into the event stream, checking for the remainder of the
double-click sequence. If a double-click is recognized, then the event
specification is matched, the corresponding actions are invoked with the
initial <#2202#><TT>:button-press</TT><#2202#> event, and the rest of the double-click
events are discarded. Otherwise, the match fails, all events remain in
the event stream, and event translation continues.
The <#2203#><TT>:double-click</TT><#2203#> keyword can also appear in a <#2204#><TT>:button-release</TT><#2204#> event specification. In this case, CLUE attempts to
match the event specification by looking ahead for
a subsequent click sequence. If a click is found, then the event
specification is matched, the corresponding actions are invoked with the
initial <#2205#><TT>:button-release</TT><#2205#> event, and the rest of the click
events are discarded. Otherwise, the match fails, all events remain in
the event stream, and event translation continues.
<P>
The <#2206#><TT>:single-click</TT><#2206#> keyword can be used to explicitly request CLUE
double-click processing, in order to verify that a double-click sequence
has <#2207#><EM>not</EM><#2207#> occurred. An event specification containing the
<#2208#><TT>:single-click</TT><#2208#> keyword will be matched only when the event is not
followed by the rest of a
double-click sequence. This form of event specification allows a contact
to reliably specify actions for both single- and double-click event
sequences, with no dependence on the relative order of <#2209#><TT>:single-click</TT><#2209#> and <#2210#><TT>:double-click</TT><#2210#> event translations.
<P>
Detecting when the <#2211#><TT>display-multipress-delay-limit</TT><#2211#> timeout has lapsed is
complicated by the possibility of network delays in
receiving events from the X server.<A ID="2212"><tex2html_anchor_invisible_mark></A>
Timestamps maintained by the X server can be used to verify a timeout, at
the expense of a message round-trip between the client and
the server. CLUE clients can optionally select such timeout
verification for a <#2213#><TT>contact-display</TT><#2213#> by using the <#2214#><TT>display-multipress-verify-p</TT><#2214#> accessor.